<template>
  <div style="width: 100%;overflow-y: scroll;overflow-x: hidden;height: 100vh;">
    <!--遮罩-->
    <div class="mask"/>
    <!--背景图片-->
    <div class="bg"/>

    <div class="container flexColumn">
      <div class="flexRow" style="padding-top: 10px;padding-left: 20px">
        <img alt="" src="@/assets/logo3.png" style="height: 50px;margin: 8px 20px 0 10px"/>
        <span class="navLink" @click="currentSection = 'introduction'">介绍</span>
        <span class="navLink" @click="currentSection = 'features'">特色</span>
        <span class="navLink" @click="currentSection = 'about'">关于</span>
        <span class="enterBtn" @click="jump">登录管理系统</span>
      </div>

      <div class="flexColumn" style="margin-top: 3%;margin-left: 5%">
        <span class="bigText">至孝智慧养老管理系统</span>
        <span class="midText" style="margin-top: 20px">免费、高效、便捷</span>
      </div>

      <!-- 动态内容展示区域 -->
      <div v-if="currentSection === 'introduction'" class="content-section">
        <p>
          至孝智慧养老是一款基于小程序和网站的全套智慧养老管理程序，提供简洁易用的交互界面和网站管理服务。同时，系统支持对用户对系统模块访问的记录，方便科研人员进一步的分析数据。</p>
      </div>
      <div v-if="currentSection === 'features'" class="content-section">
        <p>微服务架构设计：采用Spring Boot的微服务架构，将系统拆分为多个独立的服务模块，提升系统的灵活性和可维护性。</p>
        <p>移动端小程序支持：开发配套的小程序，方便老年人和家属在手机上随时访问服务。</p>
        <p>安全与隐私保护机制：设计完善的数据安全和隐私保护机制，确保用户数据的安全性和隐私性，增强用户对系统的信任感。</p>
      </div>
      <div v-if="currentSection === 'about'" class="content-section">
        <p>河南大学软件学院单位研发</p>
        <p>具体联系电话：15083315803</p>
        <p>邮箱：2330648064@qq.com</p>
      </div>

    </div>
  </div>
</template>

<script>
export default {
  name: "HomePage",
  data() {
    return {
      currentSection: ''  // 当前显示的内容部分
    };
  },
  methods: {
    jump() {
      this.$router.push('/login')
    }
  },
}
</script>

<style scoped>
.bg {
  width: 100%;
  height: 100%;
  position: fixed;
  top: 0;
  background-size: cover;
  filter: brightness(0.8) saturate(200%);
  animation: begin 1.5s;
  background-image: url("@/assets/background.png");
  z-index: -2;
}

.mask {
  background-color: #333;
  width: 150%;
  height: 240%;
  position: absolute;
  top: -100px;
  left: -100px;
  overflow: hidden;
  transition: 0.5s;
  z-index: -1;
  animation: maskBegin 1.5s;
  opacity: 0;
}

@keyframes begin {
  0% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes maskBegin {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

.container {
  color: white;
  width: 100%;
  height: 100vh;
  margin-top: 0;
}

.bigText {
  font-size: clamp(3.75rem, 1.4rem + 3vw, 5rem);
  font-weight: bold;
  letter-spacing: 5px;
}

.midText {
  font-size: clamp(1.5rem, 0.6rem + 1.4vw, 3rem);
  font-weight: normal;
  letter-spacing: 5px;
}

.enterBtn {
  border-radius: 20px;
  height: 20px;
  border: 2px white solid;
  margin-top: 20px;
  margin-right: 20px;
  width: 120px;
  padding: 8px 10px 12px;
  text-align: center;
  cursor: pointer;
  transition: 0.4s;
  margin-left: auto; /* 将登录按钮推到右侧 */
}

.enterBtn:hover {
  background-color: rgba(255, 255, 255, 0.6);
}

.navLink {
  margin: 0 5px;
  padding: 20px 18px;
  border-radius: 5px;
  font-size: 15px;
  position: relative;
  cursor: pointer;
  transition: .25s;
  font-weight: bold;
  color: #ddd;
}

.navLink::before {
  position: absolute;
  left: 20px;
  bottom: 12px;
  width: calc(100% - 40px);
  height: 3px;
  content: '';
  background: #d76364;
  border-radius: 2px;
  transition: .25s;
  transform: scale(0);
  opacity: 0;
}

.navLink:hover {
  color: #fff;
  transform: scale(1.2);
}

.navLink:hover:before {
  transform: scale(1);
  opacity: 1
}

.content-section {
  margin-top: 20px;
  padding: 20px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.8);
  font-family: '楷体', 'KaiTi', serif; /* 设置字体为楷体 */
  font-size: 25px; /* 增大字体大小 */
  /*font-weight: bold; !* 加粗字体 *!*/
  line-height: 1.4; /* 增加行高 */
  max-width: 800px; /* 限制内容区域宽度 */
  margin-left: 200px;
  /*margin-right: auto;*/
  text-align: justify; /* 文字两端对齐 */
}

p {
  text-indent: 2em;
}

/*滚动条*/
::-webkit-scrollbar {
  overflow: auto;
  width: 10px;
}

::-webkit-scrollbar-thumb {
  background-color: #ccc;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background-color: #aaa;
}

::-webkit-scrollbar-track {
  background: grey;
}

</style>